<script setup>
import { ref, watch } from 'vue';


let name = ref("吴小帆")

const open = () => {
	name.value = name.value + 1  
	console.log('点击open',event)
}

watch(
	name ,(new1,old1) => {
		console.log(old1 +" -- "+ new1);
	}
)


</script>

<template>
	
	<button v-on:click="open">打开</button>
	
	<input type = "input" v-model="name" />
	
	<p>{{name}}</p>

</template>

<style scoped></style>
